package net.xdclass.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import net.xdclass.manager.AccountManager;
import net.xdclass.mapper.AccountMapper;
import net.xdclass.model.AccountDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class AccountManagerImpl implements AccountManager {
	@Autowired
	private AccountMapper accountMapper;

	@Override
	public int insert(AccountDO accountDO) {
		return accountMapper.insert(accountDO);
	}

	@Override
	public List<AccountDO> findByPhone(String phone) {
		List<AccountDO> accountDOList = accountMapper.selectList(new QueryWrapper<AccountDO>().eq("phone",phone));
		return accountDOList;
	}
}
